import request from "@/utils/request.ts";

export function getHospital(page: number, limit: number, hostype?: string, districtCode?: string) {
    if (hostype === "" && districtCode === "") {
        return request.get(`/hosp/hospital/${page}/${limit}`)
    } else {
        return request.get(`/hosp/hospital/${page}/${limit}?hostype=${hostype}&districtCode=${districtCode}`)

    }
}

export function getHosLevel(dictCode: string) {
    return request.get(`/cmn/dict/findByDictCode/${dictCode}`)
}

export function getHosRegion(cityName: string) {
    return request.get(`/cmn/dict/findByDictCode/${cityName}`)
}

export function getHospitalName(hospitalName: string) {
    return request.get(`/hosp/hospital/findByHosname/${hospitalName}`)
}


